/*
 * @Author: panda-hbd 10254515+panda-hbd@user.noreply.gitee.com
 * @Date: 2022-11-11 08:39:08
 * @LastEditors: panda-hbd 10254515+panda-hbd@user.noreply.gitee.com
 * @LastEditTime: 2022-11-11 16:12:49
 * @FilePath: \cal-money-system\src\main.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
//导入utils/request.js   暴露出一个自定义的axios对象
import $http from './utils/request'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import ViewUIPlus from 'view-ui-plus'
import 'view-ui-plus/dist/styles/viewuiplus.css'
import store from './store/index';
const app = createApp(App);
app.use(store);
app.use(router)
app.use(ViewUIPlus)
    // CROS跨域是否允许凭证 
$http.defaults.withCredentials = true;
//把axios置为app的全局属性, app的全局属性名$http
app.config.globalProperties.$http = $http;

//使用Elementplus
app.use(ElementPlus)

//Elementplus的icon
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}
//挂载元素,放在最后
app.mount('#app')